Skip to content

chore: remove dead storage-challenge and health-check Hash helpers#300

Open
j-rafique wants to merge 1 commit into
masterfrom
cleanup/sc-hc-deadcode
Open

chore: remove dead storage-challenge and health-check Hash helpers#300
j-rafique wants to merge 1 commit into
masterfrom
cleanup/sc-hc-deadcode

Conversation

@j-rafique

Copy link
Copy Markdown
Contributor

Drops 7 unreachable functions flagged by deadcode -test ./...:

pkg/types/storage_challenge.go
- MessageTypeFromString
- (StorageChallengeMessages).Hash + the orphan slice type
- (AggregatedScoreList).Hash + the orphan slice type pkg/types/healthcheck_challenge.go
- (HealthCheckChallengeMessages).Hash + the orphan slice type
pkg/utils/storagechallenge/storage_challenge.go (whole pkg, orphan)
pkg/utils/healthcheckchallenge/health_check_challenge.go (whole pkg, orphan)
pkg/storagechallenge/deterministic/deterministic.go
- EpochStartHeight

Verified via deadcode diff on origin/master @ 82cebf7: baseline 147 ->
after 140 (exactly the 7 above removed, no new findings). MessageType, HealthCheckMessage and the consumed deterministic helpers stay.

go build ./..., go vet ./..., and go test ./... -short -count=1 pass in the supernode module; sn-manager, cmd/sncli, and tests/system also build clean.

Drops 7 unreachable functions flagged by `deadcode -test ./...`:

  pkg/types/storage_challenge.go
    - MessageTypeFromString
    - (StorageChallengeMessages).Hash + the orphan slice type
    - (AggregatedScoreList).Hash + the orphan slice type
  pkg/types/healthcheck_challenge.go
    - (HealthCheckChallengeMessages).Hash + the orphan slice type
  pkg/utils/storagechallenge/storage_challenge.go    (whole pkg, orphan)
  pkg/utils/healthcheckchallenge/health_check_challenge.go (whole pkg, orphan)
  pkg/storagechallenge/deterministic/deterministic.go
    - EpochStartHeight

Verified via deadcode diff on origin/master @ 82cebf7: baseline 147 ->
after 140 (exactly the 7 above removed, no new findings). MessageType,
HealthCheckMessage and the consumed deterministic helpers stay.

go build ./..., go vet ./..., and go test ./... -short -count=1 pass
in the supernode module; sn-manager, cmd/sncli, and tests/system also
build clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant